package com.qqcommon;

import java.io.Serializable;

/**
 * @author wty
 * @date 2022/10/25 10:36
 */
@SuppressWarnings({"all"})
public class Message implements Serializable {
    private static final long serialVersionUID = 1L; // 实现Serializable接口，需要序列化ID
    private String sender; // 发送方
    private String receiver; // 接收方
    private String content; // 发送消息的内容
    private String sendTime; // 发送时间
    private String type; // 消息类型(可以在接口定义消息类型)

    // 进行扩展和文件相关的字段
    private  byte[] fileByte;
    private int fileSize = 0;
    private String targetPath; // 文件传输目标位置
    private String path; // 源文件位置

    public byte[] getFileByte() {
        return fileByte;
    }

    public void setFileByte(byte[] fileByte) {
        this.fileByte = fileByte;
    }

    public int getFileSize() {
        return fileSize;
    }

    public void setFileSize(int fileSize) {
        this.fileSize = fileSize;
    }

    public String getTargetPath() {
        return targetPath;
    }

    public void setTargetPath(String targetPath) {
        this.targetPath = targetPath;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public String getSender() {
        return sender;
    }

    public void setSender(String sender) {
        this.sender = sender;
    }

    public String getReceiver() {
        return receiver;
    }

    public void setReceiver(String receiver) {
        this.receiver = receiver;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getSendTime() {
        return sendTime;
    }

    public void setSendTime(String sendTime) {
        this.sendTime = sendTime;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Message(String sender, String receiver, String content, String sendTime, String type) {
        this.sender = sender;
        this.receiver = receiver;
        this.content = content;
        this.sendTime = sendTime;
        this.type = type;
    }
    public Message(){}
}
